package me.magicall.db.outsea;

import me.magicall.db.util.DbUtil;

public enum CommonNameTransformer implements ModelNameTableNameTransformer, FieldNameColumnNameTransformer {
	INSTANCE;

	@Override
	public String fieldNameToColumnName(final String fieldName) {
		return DbUtil.javaNameToDbName(fieldName);
	}

	@Override
	public String columnNameToFieldName(final String columnName) {
		return DbUtil.dbNameToJavaName(columnName);
	}

	@Override
	public String modelNameToTableName(final String modelName) {
		return DbUtil.javaNameToDbName(modelName);
	}

	@Override
	public String tableNameToModelName(final String tableName) {
		return DbUtil.dbNameToJavaName(tableName);
	}

}
